package com.myhome.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.myhome.config.constant.R;
import com.myhome.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.myhome.domain.UserAuthForm;
import com.myhome.dto.UserDto;
import com.myhome.model.*;

import java.util.List;
import java.util.Map;

/**
 * @Author QYiXin
 * @Date 2021 10 13 10 51
 **/
public interface UserService extends IService<User> {


    Page<User> getPagesUsers(Page<User> page, String mobile, Long userId, String userName, String realName, Byte status);


    Page<User> getInvitedPerson(Page<User> page, Long userId);

    Page<User> getPagesAuth(Page<User> page, String mobile, Long userId, String userName, String realName, Byte reviewsStatus);


    boolean updateAuthStatus(Long id, Byte authStatus, Long authCode, String remark);

    User getUserByMobileOrEmail(String username);

    Boolean checkAuth(Long userId, UserAuthForm userAuthForm);

    Boolean updatePhone(Long userId,NewPhoneAndOldPhone newPhoneAndOldPhone);

    Boolean checkNewPhone(String mobile, String countryCode);

    Boolean updateLoginPassword(Long userId, UpdatePasswordInfo updatePasswordInfo);

    Boolean updatePayPassword(Long userId, UpdatePasswordInfo updatePasswordInfo);

    Boolean unsetPassword(Long userId, UnsetPasswordInfo unsetPasswordInfo);

    List<User> getInvitedPeron();

    List<UserDto> getManyUsers(List<Long> ids);

    boolean register(RegisterParam registerParam);

    Boolean publicSetPassword(PublicSetPasswordParam publicSetPasswordParam);

    Map<Long, UserDto> getBasicMapUserDto(List<Long> ids, String userName, String mobile);
}
